package test;

public class Rectangle extends GeometricObject {
  private double length;

  public Rectangle() {
  }

  public Rectangle(double length) {
    this.length = length;
  }

  /** Return length */
  public double getLength() {
    return length;
  }

  /** Set a new length */
  public void setLength(double length) {
    this.length = length;
  }



  @Override /** Return area */
  public double getArea() {
    return length * length;
  }

  @Override /** Return perimeter */
  public double getPerimeter() {
    return 4 * length;
  }
}
